'OutStandingIssues: Finir les GET/SET pour les DBNull.Value

Namespace PL.MetaSDK
    Public Class MetaApplicationOptions
        Private _dataRow As DataRow

        Public Sub New(ByVal dataRow As DataRow)
            Me.DataRow = dataRow
        End Sub

        Public Property AppOptionId() As Guid
            Get
                Return IIf(IsDBNull(Me.DataRow("AppOptionId")), Nothing, Me.DataRow("AppOptionId"))
            End Get
            Set(ByVal value As Guid)
                Me.DataRow("AppOptionId") = value
            End Set
        End Property

        Public Property ApplicationID_FK() As Guid
            Get
                Return IIf(IsDBNull(Me.DataRow("ApplicationID_FK")), Nothing, Me.DataRow("ApplicationID_FK"))
            End Get
            Set(ByVal value As Guid)
                Me.DataRow("ApplicationID_FK") = value
            End Set
        End Property

        Public Property OptionName() As String
            Get
                Return IIf(IsDBNull(Me.DataRow("OptionName")), Nothing, Me.DataRow("OptionName"))
            End Get
            Set(ByVal value As String)
                Me.DataRow("OptionName") = value
            End Set
        End Property

        Public Property OptionDescr() As String
            Get
                Return IIf(IsDBNull(Me.DataRow("OptionDescr")), Nothing, Me.DataRow("OptionDescr"))
            End Get
            Set(ByVal value As String)
                Me.DataRow("OptionDescr") = value
            End Set
        End Property

        Public Property DfltOptionValue() As String
            Get
                Return IIf(IsDBNull(Me.DataRow("DfltOptionValue")), Nothing, Me.DataRow("DfltOptionValue"))
            End Get
            Set(ByVal value As String)
                Me.DataRow("DfltOptionValue") = value
            End Set
        End Property

        Public Property Notes() As String
            Get
                Return IIf(IsDBNull(Me.DataRow("Notes")), Nothing, Me.DataRow("Notes"))
            End Get
            Set(ByVal value As String)
                Me.DataRow("Notes") = value
            End Set
        End Property

        Public Property Overwritable() As Boolean
            Get
                Return IIf(IsDBNull(Me.DataRow("Overwritable")), Nothing, Me.DataRow("Overwritable"))
            End Get
            Set(ByVal value As Boolean)
                Me.DataRow("Overwritable") = value
            End Set
        End Property

        Public Property IsReadOnly() As Boolean
            Get
                Return IIf(IsDBNull(Me.DataRow("ReadOnly")), Nothing, Me.DataRow("ReadOnly"))
            End Get
            Set(ByVal value As Boolean)
                Me.DataRow("ReadOnly") = value
            End Set
        End Property

        Public Property SystemRecord() As Boolean
            Get
                Return IIf(IsDBNull(Me.DataRow("SystemRecord")), Nothing, Me.DataRow("SystemRecord"))
            End Get
            Set(ByVal value As Boolean)
                Me.DataRow("SystemRecord") = value
            End Set
        End Property

        Public Property Crtd_DT() As Date?
            Get
                Return IIf(IsDBNull(Me.DataRow("Crtd_DT")), Nothing, Me.DataRow("Crtd_DT"))
            End Get
            Set(ByVal value As Date?)
                Me.DataRow("Crtd_DT") = value
            End Set
        End Property

        Public Property Crtd_UId() As String
            Get
                Return IIf(IsDBNull(Me.DataRow("Crtd_UId")), Nothing, Me.DataRow("Crtd_UId"))
            End Get
            Set(ByVal value As String)
                Me.DataRow("Crtd_UId") = value
            End Set
        End Property

        Public Property LUpd_DT() As Date?
            Get
                Return IIf(IsDBNull(Me.DataRow("LUpd_DT")), Nothing, Me.DataRow("LUpd_DT"))
            End Get
            Set(ByVal value As Date?)
                Me.DataRow("LUpd_DT") = value
            End Set
        End Property

        Public Property LUpd_UId() As String
            Get
                Return IIf(IsDBNull(Me.DataRow("LUpd_UId")), Nothing, Me.DataRow("LUpd_UId"))
            End Get
            Set(ByVal value As String)
                Me.DataRow("LUpd_UId") = value
            End Set
        End Property

        Public Property RecordVersion() As Byte()
            Get
                Return IIf(IsDBNull(Me.DataRow("RecordVersion")), Nothing, Me.DataRow("RecordVersion"))
            End Get
            Set(ByVal value As Byte())
                Me.DataRow("RecordVersion") = value
            End Set
        End Property

        Public Property DataRow() As DataRow
            Get
                Return _dataRow
            End Get
            Set(ByVal value As DataRow)
                _dataRow = value
            End Set
        End Property

    End Class
End Namespace
